package edu.cuit.canary.demo.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Setter
@Getter
@Accessors(chain = true)
@ToString
@TableName("tb_user")
public class User extends Model<User> {
    @TableId(type = IdType.AUTO) //主键自增
    private Integer id;
    private String username;
    private String password;

    @Version
    private int version = 1;

    //逻辑删除字段
    @TableLogic
    private boolean deleted;
    private LocalDateTime registerTime;
    private LocalDateTime updateTime;
}
